/* 自定义trim */
function trim (str) {  //删除左右两端的空格,自定义的trim()方法
  return str == undefined ? "" : str.replace(/(^\s*)|(\s*$)/g, "")
}

//获取url地址上面的参数
function requestUrlParam(argname){  //argname='id'
  var url = location.href           //localhost:8080/backend/page/member/add.html?id=1645700037763624962
  var arrStr = url.substring(url.indexOf("?")+1).split("&") //先拿到id=1645700037763624962 再分割得到["id=1645700037763624962"]
  for(var i =0;i<arrStr.length;i++)
  {
      var loc = arrStr[i].indexOf(argname+"=") //id=这个字符串的下标
      if(loc!=-1){
          return arrStr[i].replace(argname+"=","").replace("?","") //1645700037763624962
      }
  }
  return ""
}
